//
//  NewsModel.m
//  11215
//
//  Created by student on 16/3/8.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "NewsModel.h"

@implementation NewsModel

-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self=[super init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+(instancetype)newsWithDict:(NSDictionary *)dict{
    return [[self alloc]initWithDict:dict];
}

+(NSArray *)newsArr{
    NSString *path=[[NSBundle mainBundle]pathForResource:@"11215" ofType:@"plist"];
    NSArray *arr=[NSArray arrayWithContentsOfFile:path];
    NSMutableArray *mArr=[NSMutableArray array];
    for (NSDictionary *dict in arr) {
        NewsModel *m=[NewsModel newsWithDict:dict];
        [mArr addObject:m];
    }
    return mArr;
}

@end
